<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="1" bgcolor="#DBE1E5"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>
{ext->getEditorsAdvanceFuntion assign="editors_advance"}
<table width="100%" cellpadding="0" cellspacing="0" bgcolor="#DBE1E5">
	<tr>
		<td width="15"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		<td height="25" class="defaultFormLabel">{t t=$el.name}</td>		
	</tr>
</table>
<table width="100%" border="0" bgcolor="#DBE1E5" cellpadding="0" cellspacing="0">
  <tr>
    <td style="padding:0px 3px 0px 15px">
		{ext->get_field_value assign="value" name=$el.name parent=$data.page.id}
		{ext->clear_string assign="str" array=$value}
		{if $_var.editor.gzip == 1}
		<script type="text/javascript">
		tinyMCE_GZ.init({ldelim}
			plugins : "table,advimage,file,flash,advlink,preview,searchreplace,contextmenu,paste,onlinevideos,insertvideo",
			themes : "big",
			languages : "{if $smarty.cookies.interface_lang=="lt"}lt{else}en{/if}",
			disk_cache : true,
			debug : false
		{rdelim});
		</script>
		<!-- Needs to be seperate script tags! -->
		{/if}
		<script type="text/javascript">
			tinyMCE.init({ldelim}
			    valid_elements : "@[id|class|style|title|dir<ltr?rtl|onclick|ondblclick|"
				+ "onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|"
				+ "onkeydown|onkeyup],a[rel|tabindex|accesskey|type|"
				+ "name|href|target|title|class|onclick],strong/b,em/i,strike,u,"
				+ "p[align|class],-ol[type|compact],-ul[type|compact],-li,br,img["
				+ "src|border|class|alt=|title|hspace|vspace|width|height|align|onclick],-sub,-sup,"
				+ "-blockquote,table[border=0|cellspacing|cellpadding|width|"
				+ "height|align|class],-tr[rowspan|width|"
				+ "height|align|valign],tbody,thead,tfoot,"
				+ "#td[colspan|rowspan|width|height|align|valign"
				+ "|scope|style],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,"
				+ "span[class],-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr,"
				+ "dd,dl,dt,"
				+ "font[color],"
				+ "object[classid|width|height|codebase|*],param[name|value|_value],embed[type|width"
				+ "|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,"
				+ "button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|"
				+ "valign|width],noscript,samp,small,tt,big,iframe[title|width|height|src|frameborder|allowfullscreen]",
				language : "{if $smarty.cookies.interface_lang=="lt"}lt{else}en{/if}",
				mode : "exact",
				theme : "big",
				elements : "{$el.name}",
				plugins : "table,advimage,file,flash,advlink,preview,searchreplace,contextmenu,paste,onlinevideos,insertvideo",
				theme_advanced_buttons1 : "undo,redo,separator,preview,separator,cut,copy,paste,pasteword,search,replace,separator,link,unlink,anchor,separator,image,file,flash{if $_var.wysiwyg.videos==1},onlinevideos{/if},separator,tablecontrols,insertvideo",
				theme_advanced_buttons2 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,sub,sup,separator,bullist,numlist,separator,outdent,indent,separator,cleanup,charmap",
				theme_advanced_buttons3 : "{if $editors_advance.styles.plugin}{$editors_advance.styles.plugin}{/if}",
				theme_advanced_toolbar_location : "top",
				theme_advanced_toolbar_align : "left",
				theme_advanced_statusbar_location : "bottom",
				paste_use_dialog : false,
				theme_advanced_resizing : false,
				theme_advanced_resize_horizontal : false,
				paste_auto_cleanup_on_paste : true,
				paste_convert_headers_to_strong : false,
				paste_strip_class_attributes : "all",
				paste_remove_spans : false,
				paste_remove_styles : false,
				tvs_parent : "{$data.page.id}",
				button_tile_map : true,
				tvs_tpl_parent_name : "{$data.page.name|urlencode}",
				tvs_field : "text{$el.id}"{if $editors_advance.styles.setup},
				{$editors_advance.styles.setup}{/if}{if $editors_advance.fontsize.setup}",
				{$editors_advance.fontsize.setup}{/if}{if $editors_advance.fontcolor.setup}",
				{$editors_advance.fontcolor.setup}"
{/if}
			{rdelim});
			
			function toggleEditor(id, cmd) {ldelim}
				var elm = document.getElementById(id);
				if (cmd == 'mceAddControl'){ldelim}
					if (tinyMCE.getInstanceById(id) == null) tinyMCE.execCommand(cmd, false, id);
				{rdelim}else{ldelim}
					tinyMCE.execCommand(cmd, false, id);
				{rdelim}
			{rdelim}
		</script>
		<textarea id="{$el.name}" name="{$el.name}" class="defaultInputTextarea" style="height:350px;" width="100%">{$value|escape:"html"}</textarea>
    </td>
  </tr>
  <tr>
    <td align="right">
	<table cellpadding="0" cellspacing="0">
		<tr>
			<td width="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>	
			<td bgcolor="#B3C3CD" height="25" style="padding:0px 10px 0px 10px"><a href="javascript:void(0);" onClick="toggleEditor('{$el.name}', 'mceAddControl'); return false;">WYSIWYG</a></td>	
			<td width="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>	
			<td bgcolor="#B3C3CD" height="25" style="padding:0px 10px 0px 10px"><a href="javascript:void(0);" onClick="toggleEditor('{$el.name}', 'mceRemoveControl'); return false;">HTML</a></td>
			<td width="1" bgcolor="#FFFFFF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			<td width="23"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
		</tr>
	</table>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="10" bgcolor="#DBE1E5"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>
